1. Field
Methods and apparatuses consistent with exemplary embodiments relate to entropy encoding and entropy decoding for video encoding and decoding.
2. Related Art
As hardware for reproducing and storing high-resolution or high-quality video content has been developed and supplied, a need for a video codec that effectively encodes or decodes high-resolution or high-quality video content has increased. Generally, a video is encoded according to a limited encoding method based on a macroblock having a predetermined size.
Image data of a spatial domain is transformed into coefficients of a frequency domain by using frequency transformation. A video codec splits an image into blocks each having a predetermined size in order to rapidly perform frequency transformation, performs DCT transformation on each of the blocks, and encodes frequency coefficients in units of the blocks. The coefficients of the frequency domain may be more easily compressed than the image data of the spatial domain. In particular, since an image pixel value of a spatial domain is expressed as a prediction error through inter prediction or intra prediction of a video codec, when frequency transformation is performed on the prediction error, a large data amount may be transformed into zero (0). A video codec reduces the data amount by replacing data which is continuously repeatedly generated with data having a smaller size.
Entropy encoding is performed in order to compress a bit string of a symbol generated by video encoding. Arithmetic coding-based entropy encoding has recently been widely used. In order to perform arithmetic coding-based entropy encoding, symbols are digitized to a bit string and context-based arithmetic coding is performed on the bit string.